package cloud.code.baseProject.constant;

/**
 * 通用字段
 * Created by zhanghaichao on 2018/4/27.
 */
public class Constant {

    public static final String contextPath = "/api";

    public static final String UTF_8 = "UTF-8";
    public static final String ISO_8859_1 = "ISO-8859-1";

    /**
     * 网络请求方式
     */
    public static String POST = "post";
    public static String GET = "get";
    public static String PUT = "put";
    public static String DELETE = "delete";
    public static String PATH = "path";
    public static String OPTIONS = "options";
    public static String TOKEN = "hidevmngToken";


    /**
     * Content-Type
     */
    public final static String ContentTypeJson = "application/json";
    public final static String ContentTypeXml = "application/xml";
    public final static String ContentTypeForm = "application/x-www-form-urlencoded";


    public static String serviceErr = "系统错误";

    public static String method404 = "{\"result\":false,\"code\":\"404\",\"success\":false,\"message\":\"该方法未被实现\"}";
    public static String noLogin = "{\"result\":false,\"code\":\"401\",\"success\":false,\"message\":\"用户未登录\"}";
    public static String noAuth = "{\"result\":false,\"code\":\"403\",\"success\":false,\"message\":\"用户权限不足\"}";
    public static String noUser = "{\"result\":false,\"code\":\"403\",\"success\":false,\"message\":\"用户不存在\"}";
    public static String passwordError = "{\"result\":false,\"code\":\"403\",\"success\":false,\"message\":\"用户密码错误\"}";
    public static String loginExpired = "{\"result\":false,\"code\":\"401\",\"success\":false,\"message\":\"用户身份过期\"}";
    public static String serviceError = "{\"result\":false,\"code\":\"500\",\"success\":false,\"message\":\"系统错误\"}";
    public static String crossDomainPass = "{\"result\":true,\"code\":\"200\",\"success\":true,\"message\":\"跨域验证通过\"}";
    public static String BadRequest = "{\"result\":true,\"code\":\"400\",\"success\":true,\"message\":\"请求参数错误\"}";
    public static String MethodNotAllowed = "{\"result\":true,\"code\":\"400\",\"success\":true,\"message\":\"请求方式错误\"}";
    public static String EmptyListJson = "{\"code\":\"\",\"isZip\":false,\"message\":\"\",\"result\":{\"list\":[],\"pageNumber\":1,\"pageSize\":50,\"totalPage\":0,\"totalRow\":0},\"success\":true}";

    public static String sqlDateString = "yyyy-mm-dd hh24:mi:ss";

    public static String dateString = "yyyy-MM-dd HH:mm:ss";
    public static String dateStringExcel = "yyyy-MM-dd-HH-mm-ss";
    public static String dateStringShout = "yyyy-MM-dd";
    public static String dateStringMonth = "yyyy-MM";
    public static String dateStringYear = "yyyy";
    public static String dateStringTime = "HH:mm:ss";

}
